package com.jiantong.user.impl.service;

import com.jiantong.user.impl.dao.AppUserRoleDao;
import com.jiantong.user.model.AppUserRole;
import com.jiantong.user.service.AppUserRoleWriteService;
import io.terminus.boot.rpc.common.annotation.RpcProvider;
import io.terminus.common.model.Response;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by mz on 6/7/17.
 *
 */
@Slf4j
@Service
@RpcProvider
public class AppUserRoleWriteServiceImpl implements AppUserRoleWriteService {

    private AppUserRoleDao appUserRoleDao;
    @Autowired
    public  AppUserRoleWriteServiceImpl(AppUserRoleDao appUserRoleDao){
        this.appUserRoleDao=appUserRoleDao;

    }
    @Override
    public Response<Long> createAppUserRole(AppUserRole appUserRole) {
        appUserRoleDao.create(appUserRole);
        return Response.ok(appUserRole.getId());
    }

    @Override
    public Response<Boolean> createAppUserRoles(List<AppUserRole> appUserRoles) {
        return null;
    }

    @Override
    public Response<Boolean> updateAppUserRole(AppUserRole appUserRole) {
        return null;
    }
}
